﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Fish.Utility
{
	[Serializable]
	public class ArrayWrapper<T> : IEnumerable<T>
	{
		[SerializeField]
		private List<T> value;

		public T this[int index]
		{
			get
			{
				return value[index];
			}
		}

		public int Length
		{
			get
			{
				return value.Count;
			}
		}

		public IEnumerator<T> GetEnumerator()
		{
			return value.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}
	}

	[Serializable]
	public class UISliderArray : ArrayWrapper<UISlider> { }

	[Serializable]
	public class IntArray : ArrayWrapper<int> { }

	[Serializable]
	public class StringArray : ArrayWrapper<string> { }
}
